#ifndef VOL_OR_H
#define VOL_OR_H

#include "matrix.h"
#include "stdio.h"
#include "stdlib.h"
#include "volAND.h"
#include <deque>
#include "sharedStructure.hpp"
#include <list>
#include "imgData.h"

class volOR{
public:
	volOR(){};
	~volOR(){};
		void updateImageDataRef(imgData *p);
	std::list<volParticle_s> vol_particle_list;
	std::list<int> particle_or_index;
	std::deque<volAND*> children;
	int id; 
	bool insertORVolume(mxArray *p_res_tree);

	void test(float P[3][4], float cam_dir[3],float &score, int &or_index, volParticle_s &particle);
	void inference();
	void argMax(volParticle_s &ptc,int or_index, float *p_template=NULL);
	float *SWTest(view_s &view, bool use_color);
	private:

	bool updateParticleList(volParticle_s & particle, int or_index);

	imgData *p_img_data;
};

#endif